package com.aaa.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_menu")
public class Menu {

    @Id
    private Integer id;
    // 菜单的名字
    private String menuname;
    // value=0代表的是一级菜单
    private Integer pid;
    //菜单的路径
    private String url;
    //菜单的图标
    private String icon;

    @Transient //食用通用mapper的时候 不作为属性使用查询
    private List<Menu> sanMenus= new ArrayList<>();
}
